

<!DOCTYPE html>
<html>

<head>
  <title>淑女投稿</title>
  <meta charset="utf-8" />
  <style type="text/css">
    body {
      width: 100%;
      height: 100%;
      margin: 0px;
      background-repeat: no-repeat;
      background-size: cover;
      background-image: url("static/img/背景.jpg");
    }

    #dialog1 {
      position: fixed;
      top: 38%;
      left: 32%;
      transform: translate(-20%, -20%);
      background-color: #fff;
      padding: 80px;
      border: 1px solid #ccc;
      width: 60%;
      height: 50%;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
      opacity: 0.8;
    }

   .message-box {
      border: 1px solid #ccc;
      padding-top: 50px;
      padding-left: 30px;
      padding-bottom: 10px;
      padding-right: 50px;
      border-radius: 10px;
      height: 85%;
    }

    textarea {
      width: 92%;
      height: 52%;
      resize: vertical;
      padding: 80px;
      border: 1px solid #ccc;
      border-radius: 2px;
      padding-left: 0;
      padding-top: 0;
      text-align: left;
      font-size: 25px;
    }

   .button-group {
      display: flex;
      justify-content: flex-end;
      margin-top: 10px;
    }

    #cancel-btn,
    #send-btn {
      background-color: #f44336;
      color: white;
      border: none;
      padding: 8px 16px;
      border-radius: 4px;
      cursor: pointer;
      margin-left: 10px;
    }

    #send-btn {
      background-color: #4CAF50;
    }

    #dialog2 {
      position: absolute;
      top: 0;
      left: 0;
      transform: translate(-2%, -200%);
      background-color: #fff;
      padding: 2%;
      border: 1px solid #ccc;
      width: 25%;
      height: 10px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
      opacity: 0.8;
      font-size: 30px;
      text-align: center;
      line-height: 10px;
    }

    /* 新增的发送成功提示框样式 */
    #success-dialog {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background-color: #fff;
      padding: 20px;
      border: 1px solid #ccc;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
      display: none;
    }
  </style>
</head>

<body>
  <div id="dialog1">
    <div class="message-box">
      <textarea placeholder="在这里输入内容"></textarea>
      <div class="button-group">
        <button id="cancel-btn">取消</button>
        <button id="send-btn">发送</button>
      </div>
    </div>
    <div id="dialog2">淑女投稿</div>
    <!-- 新增的发送成功提示框 -->
    <div id="success-dialog">发送成功！<button id="close-success-dialog">×</button></div>
  </body>

  <script>
    const cancelBtn = document.getElementById('cancel-btn');
    const sendBtn = document.getElementById('send-btn');
    const textarea = document.querySelector('textarea');
    const successDialog = document.getElementById('success-dialog');
    const closeSuccessDialogBtn = document.getElementById('close-success-dialog');

    cancelBtn.addEventListener('click', () => {
      textarea.value = '';
    });

    sendBtn.addEventListener('click', () => {
      textarea.value = '';
      successDialog.style.display = 'block';
    });

    closeSuccessDialogBtn.addEventListener('click', () => {
      successDialog.style.display = 'none';
    });
  </script>

</html>